<?php
class Authorize_model extends CI_Model {
	public function __construct() {
		parent::__construct();
	}

	public function loginAuthorize() {
		if (!$this->onlineAuthorize()) {
			return redirect('login');
		}
		return TRUE;
	}

	public function onlineAuthorize() {
		$online = $this->session->userdata('username');
		if (!$online) {
			return FALSE;
		}
		return TRUE;
	}
}